An electric motor may feature a rotor with permanent magnets and a stator, such as an interior permanent magnet (IPM) motor or IPM synchronous motor. An interior permanent magnet (IPM) motor or IPM synchronous machine may have varying magnetic field strength because of a temperature change in the magnets associated with the rotor. In turn, if the magnetic field strength decreases, the output torque and operating efficiency of the motor tends to decrease. Certain motors have no direct temperature sensors that measure the temperature of the magnets on the rotor, as opposed to the stator housing or the stator windings. Further, the rotor magnet temperature may have a poorly defined, erratic or inconsistent relationship with the stator winding temperature or coolant temperature at different speed regions of the motor. Thus, there is a need for an improved method and system for controlling an electrical motor with temperature compensation.